package com.three.crm.bean;

import android.os.Parcel;
import android.os.Parcelable;

public class AreaBean implements Parcelable {

    private int id;
    private String name;
    private int parent_id;
    private int level;

    public AreaBean() {
    }

    public AreaBean(int id, String name, int parent_id, int level) {
        this.id = id;
        this.name = name;
        this.parent_id = parent_id;
        this.level = level;
    }

    protected AreaBean(Parcel in) {
        id = in.readInt();
        name = in.readString();
        parent_id = in.readInt();
        level = in.readInt();
    }

    public static final Creator<AreaBean> CREATOR = new Creator<AreaBean>() {
        @Override
        public AreaBean createFromParcel(Parcel in) {
            return new AreaBean(in);
        }

        @Override
        public AreaBean[] newArray(int size) {
            return new AreaBean[size];
        }
    };

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getParent_id() {
        return parent_id;
    }

    public void setParent_id(int parent_id) {
        this.parent_id = parent_id;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeString(name);
        dest.writeInt(parent_id);
        dest.writeInt(level);
    }
}
